home *** CD-ROM | disk | FTP | other *** search
/ Champak 109 / Vol 109.iso / games / flash_ch.swf / scripts / frame_7 / DoAction.as
Text File  |  2008-11-12  |  607b  |  28 lines

  1. signal.gotoAndStop("comp");
  2. messages.gotoAndStop(1);
  3. computerScore = 0;
  4. playerScore = 0;
  5. var i = 0;
  6. while(i < 8)
  7. {
  8.    j = 0;
  9.    while(j < 8)
  10.    {
  11.       if(chessBoard[i][j] != VOID)
  12.       {
  13.          if((chessBoard[i][j] & 1) == SIDE_COMPUTER)
  14.          {
  15.             computerScore += chessBoard[i][j] >> 1;
  16.             playerScore -= chessBoard[i][j] >> 1;
  17.          }
  18.          else if((chessBoard[i][j] & 1) == SIDE_PLAYER)
  19.          {
  20.             computerScore -= chessBoard[i][j] >> 1;
  21.             playerScore += chessBoard[i][j] >> 1;
  22.          }
  23.       }
  24.       j++;
  25.    }
  26.    i++;
  27. }
  28.